package com.youxin.busfoundation.common;

import com.youxin.busfoundation.bean.BusinessMessages;
import com.youxin.busfoundation.bean.ResponseMessage;
import com.youxin.foundation.lang.BaseException;

/**
 * 基础业务类异常类
 * @author yingde.cao
 *
 */
public class BusinessRuntimeException extends BaseException{

	private static final long serialVersionUID = 13259809947409L;
	private Object object;
	public BusinessRuntimeException(int code, String msg)
	{
		super(code,msg);
	}
	
	public BusinessRuntimeException(int code, String msg,Object object)
	{
		this(code,msg);
		this.object=object;
	}
	
	public BusinessRuntimeException(ResponseMessage message,Object object)
	{
		this(message);
		this.object=object;
	}
	
	public BusinessRuntimeException(ResponseMessage message)
	{
		this(message.getCode(), message.getMsg());
	}
	
	public BusinessRuntimeException(String msg)
	{
		super(BusinessMessages.USERFAILURE_CODE,msg);
	}
	
//	public BusinessRuntimeException(String msg,,Object object)
//	{
//		this(msg);		
//	}

	public Object getObject() {
		return object;
	}
	
	
}
